﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using SyncList.UserInterface.Helpers;

namespace SyncList.UserInterface.ValueConverters
{

    /// <summary>
    /// Convertisseur
    /// </summary>
    public class CheckValueConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string imageName = "unchecked.png";
            Brush result = null;
            bool v = (bool)value;
            if (v)
                imageName = "checked.png";

            result = IconHelper.GetImageBrush(imageName);
            return (result);
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
